package com.neusoft.zqygbc.neusoft_wenda.activity;

/**
 * Created by Lenovo on 2017/5/10.
 */
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.neusoft.zqygbc.neusoft_wenda.R;



public abstract class BaseAvtivity extends AppCompatActivity {
    protected int layout_file= R.layout.activity_main;
    abstract void initViews();
    abstract void initEvents();
    abstract void initData();
    void setLayout(int layout_file)
    {
        setContentView(layout_file);
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setLayout(layout_file);
        initViews();
        initData();
        initEvents();

    }
    public String getUser_id()
    {
        SharedPreferences sid;
        sid =getSharedPreferences("userinfo", Context.MODE_PRIVATE);
        return sid.getString("user_id", "");
    }
}
